package com.ljx.itbbs.common.domain.vo.resp;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-03-24  14:26
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PageResp<T> implements Serializable {

    @ApiModelProperty("总条数")
    private Long total;

    @ApiModelProperty("当前页的列表")
    private List<T> list;

    public PageResp<T> empty() {
        return new PageResp<>(0L, new ArrayList<>());
    }
}
